When the radio button is already on "other" then the input field for
the namespace should not get hidden by JavaScript on load.
Also remove the readonly attribute in HTML because the readonly
attribute can not get removed with disabled JavaScript.
Change-Id: I8cfde90d791765234572caf00b731881ac2eda48
(cherry picked from commit
31a472655b246df3c072d36959afcb7d2897889d)
$this->parent->getTextBox( [
'var' => 'wgMetaNamespace',
'label' => '', // @todo Needs a label?
- 'attribs' => [ 'readonly' => 'readonly', 'class' => 'enabledByOther' ]
+ 'attribs' => [ 'class' => 'enabledByOther' ]
] ) .
$this->getFieldsetStart( 'config-admin-box' ) .
$this->parent->getTextBox( [
// Hide "other" textboxes by default
// Should not be done in CSS for javascript disabled compatibility
- $( '.enabledByOther' ).closest( '.config-block' ).hide();
+ if ( !$( '#config__NamespaceType_other' ).is( ':checked' ) ) {
+ $( '.enabledByOther' ).closest( '.config-block' ).hide();
+ }
// Enable/disable "other" textboxes
$( '.enableForOther' ).click( function () {